import React, { Component } from 'react'
import { HashRouter, BrowserRouter, Route, Switch, Redirect } from 'react-router-dom';
import useStateDome from '@/Pages/useStateDome'
import useEffectDome from '@/Pages/useEffectDome'
import useContextDome from '@/Pages/useContextDome'
import useReducer from '@/Pages/useReducer'
import redux from '@/Pages/redux'
import useMemo from '@/Pages/useMemo'
import useRef from '@/Pages/useRef'
import custom from '@/Pages/custom'
import Tabbar from '@/components/tabbar'

export default class index extends Component {
    render() {
        return (
            <BrowserRouter>
                <HashRouter>
                    <Tabbar />
                    <Switch>
                        <Route path='/custom' component={custom}></Route>
                        <Route path='/useRef' component={useRef}></Route>
                        <Route path='/useMemo' component={useMemo}></Route>
                        <Route path='/redux' component={redux}></Route>
                        <Route path='/useReducer' component={useReducer}></Route>
                        <Route path='/useEffectDome' component={useEffectDome}></Route>
                        <Route path='/useStateDome' component={useStateDome}></Route>
                        <Route path='/useContextDome' component={useContextDome}></Route>
                        <Redirect to='/useStateDome' from="/*"></Redirect>
                    </Switch>
                </HashRouter>
            </BrowserRouter>
        )
    }
}